package com.sky.mapper;

import com.sky.dto.OrdersPageQueryDTO;
import com.sky.entity.OrderDetail;
import com.sky.entity.Orders;
import com.sky.vo.OrderVO;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface OrderMapper {
    void saveOrders(Orders orders);

    @Insert("insert into order_detail (name, order_id,dish_id, setmeal_id,dish_flavor, number,amount, image) values (#{name},#{orderId},#{dishId},#{setmealId},#{dishFlavor},#{number},#{amount},#{image})")
    void saveOrderDetail(OrderDetail orderDetail);

    List<OrderVO> pageQueryList(OrdersPageQueryDTO ordersPageQueryDTO);
}
